import { STreasureCampInfo } from "../../../../Message/Public/STreasureCampInfo";
import { ColorConfig } from "../../resource/ColorConfig";
import { HTMLUtil } from "../../../../com/gengine/utils/HTMLUtil";
import { GameDefConfig } from "../../resource/GameDefConfig";
type int = number;
//class NationalTreaCampScoreItem
    
    export  class NationalTreaCampScoreItem /* flash.display.Sprite */
    {
        constructor()
        {
            
            this.initUI();
            return;
        }

        protected initUI(): void
        {
            this._rankTxt = new Object /* flash.text.TextField */();
            this._rankTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._rankTxt.mouseEnabled = false;
            this._rankTxt.width = 20;
            this._rankTxt.height = 20;
            this._rankTxt.x = 15;
            addChild(this._rankTxt);
            this._campTxt = new Object /* flash.text.TextField */();
            this._campTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._campTxt.mouseEnabled = false;
            this._campTxt.width = 20;
            this._campTxt.height = 20;
            this._campTxt.x = 60;
            addChild(this._campTxt);
            this._totalTxt = new Object /* flash.text.TextField */();
            this._totalTxt.autoSize = flash.text.TextFieldAutoSize.CENTER;
            this._totalTxt.mouseEnabled = false;
            this._totalTxt.width = 20;
            this._totalTxt.height = 20;
            this._totalTxt.x = 140;
            addChild(this._totalTxt);
            this._lastTxt = new Object /* flash.text.TextField */();
            this._lastTxt.autoSize = flash.text.TextFieldAutoSize.CENTER;
            this._lastTxt.mouseEnabled = false;
            this._lastTxt.width = 20;
            this._lastTxt.height = 20;
            this._lastTxt.x = 223;
            addChild(this._lastTxt);
            return;
        }

        public updateData(arg1: STreasureCampInfo, arg2: int): void
        {
            var loc1=ColorConfig.instance.getCampColor(arg1.camp).color;
            this._rankTxt.htmlText = HTMLUtil.addColor(arg2 + "", loc1);
            this._campTxt.htmlText = HTMLUtil.addColor(GameDefConfig.instance.getECamp(arg1.camp), loc1);
            this._totalTxt.htmlText = HTMLUtil.addColor(arg1.guard + arg1.rest + arg1.seize + "", loc1);
            this._lastTxt.htmlText = HTMLUtil.addColor(arg1.rest + "", loc1);
            return;
        }

        public dispose(): void
        {
            return;
        }

        /* internal */ /* var */_rankTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_campTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_totalTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_lastTxt: Object /* flash.text.TextField */;
    }
